﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoResumeSend.Entity;
namespace AutoResumeSend.Componments
{
    public class WebSiteList
    {
        public List<WebSiteInfo> list = new List<WebSiteInfo>();

        public WebSiteList()
        {


            WebSiteInfo web = new WebSiteInfo();
            web.Host = "http://job.cnblogs.com";
            web.WebLink = "http://job.cnblogs.com/offer/page/{0}/";
            web.WebName = "博客园";
            web.RegMenuString=@"<h4[^<>]*?><a[^<>]*?hrefs*=s*[\'\""\""s]?([^\""]*)[\'\""]?[^<>]*?>(.*?)</a></h4>[\n.]*?[^<>]*?<div>[\n.]*?[^<>]*?<a[^<>]*?hrefs*=s*[\'\""\""s]?[^\""]*[\'\""]?[^<>]*?>.*?[\n.]*?[^<>]*?</a>[\n.]*?[^<>]*?<span[^<>]*?>[\n.]*?[^<>]*?<a[^<>]*?>(.*?)</a>.*?<a[^<>]*?>(.*?)</a>.*?[\n.]*?[^<>]*?</span>[\n.]*?[^<>]*?</div>[\n.]*?[^<>]*?<div[^<>]*?><span[^<>]*?>.*?</span>(\d{1,})[\n.]*?[^<>]*?.*?<span[^<>]*?>.*?</span>.*?<img[^<>]*?>(.*?)<span[^<>]*?>";

            web.RegOccurUrlIndex = 1;
            web.RegOccurTitleIndex = 2;
            web.RegJobProvinceIndex = 3;
            web.RegJobAreaIndex = 4;
            web.RegJobYearIndex = 5;
            web.RegPublishTimeIndex = 6;
            web.RegOccurMenuGroupMax = 6;

            web.RegOccurString = @"<div[^<>]*?>[\n.]*?.*?<h5[^<>]*?class=\""position_info\"">[\n.]*?.*?</h5>[\n.]*?.*?<p[^<>]*?class=\""content\"">([\n.]*?.*?)</p>[\n.]*?.*?</div?[\n.]*?.*?<div[^<>]*?>[\n.]*?.*?<h5[^<>]*?class=\""position_info\"">.*?</h5>[\n.]*?.*?<p[^<>]*?class=\""content\"">[\n.]*?.*?<a([^<>]*?)>(.*?)</a>";
            web.RegOccurGroupMax = 3;
            web.RegOccurContentIndex = 1;
            web.RegCompanyEmailIndex = 2;
            web.Encoding = System.Text.Encoding.UTF8;

            list.Add(web);
        }

      

    }
}
